<?php
/**
 * Created by PhpStorm.
 * User: xiongrui
 * Date: 2017-06-30
 * Time: 22:48
 */

namespace app\common\exception;


use Exception;
use think\exception\Handle;

class Dispose extends Handle
{
    public function render(Exception $e)
    {
        if($e instanceof Skip){
            $result = [
                'msg'   => $e->msg,
                'code'  => $e->code,
                'url'   => $e->url
            ];
            return json($result);
        }

        return parent::render($e);
    }
}
